//
//  ToMainViewSegue.m
//  Conferences
//
//  Created by Mason Mei on 5/12/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "ToMainViewSegue.h"

@implementation ToMainViewSegue
@synthesize appDelegate = _appDelegate;

-(void)perform{
    self.appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
    UIViewController *src = self.sourceViewController;
    UIViewController *dest = self.destinationViewController;
    [src.view removeFromSuperview];
    [self.appDelegate.window addSubview:dest.view];
    self.appDelegate.window.rootViewController = dest;    
}
@end
